<!DOCTYPE html>
<html lang="en" xmlns:th="http//www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单页面</title>

    <link rel="stylesheet" href="css/order.css">

    <link rel="stylesheet" href="css/bootstrap.min.css">

    <link rel="stylesheet" href="css/main.css">

    <link rel="stylesheet" href="css/green.css">


</head>
<body>
<header class="header">
    <nav class="navbar navbar-top-bar navbar-static-top">
        <div class="container">
            <ul class="navbar-nav nav navbar-right">
                <li>订单信息</li>
            </ul>
        </div>
    </nav>
</header>
<div class="breadcrumb-container">
    <div class="container">
        <ul class="breadcrumb pull-left">
            <li><a href="index">主页</a></li>
        </ul>
    </div>
</div>


<div id="div1">

    <table id="table_buy">
        <caption></caption>
        <thead>
        <tr>
            <td id="head_buy" class="td_head" colspan="7">&nbsp;&nbsp;我买入的</td>
        </tr>
        </thead>
        <tbody th:each="buyOrder:${session.myBuy}">
        <tr>
            <td class="td_img" rowspan="2"><img class="img1" th:src="${buyOrder.imgUrl}"></td>
            <td class="td_goods" rowspan="2" th:text="${buyOrder.goodsName}">高等数学1</td>
            <td class="td_goods_num" rowspan="2" th:text="${buyOrder.orderDate}">1</td>
            <td class="td_goods_price" rowspan="2" th:text="${buyOrder.goodsPrice}+'元'">￥20</td>
            <td class="td_seller1">卖家:</td>
            <td class="td_state" rowspan="2" th:text="${buyOrder.orderStatus.getInfo()}">正在运输中</td>
            <td class="td_operate1">
                <a onclick="disp_confirm_receive()" th:href="@{ackReceive(orderId=${buyOrder.orderId})}" href="#">确认收货</a>
            </td>
        </tr>
        <tr>
            <td class="td_seller2" th:text="${buyOrder.sellerName}">XXX</td>
            <td class="td_operate2"><a onclick="disp_confirm_cancel()" th:href="@{cancelOrder(orderId=${buyOrder.orderId})}" href="#">取消订单</a></td>
        </tr>
        </tbody>
    </table>

    <table id="table_sell">
        <caption></caption>
        <thead>
        <tr>
            <td id="head_sell" class="td_head" colspan="7">&nbsp;&nbsp;我卖出的</td>
        </tr>
        </thead>
        <tbody th:each="sellOrder:${session.mySell}">
        <tr>
            <td class="td_img" rowspan="2"><img class="img1" th:src="${sellOrder.imgUrl}"></td>
            <td class="td_goods" rowspan="2" th:text="${sellOrder.goodsName}">高等数学2</td>
            <td class="td_goods_num" rowspan="2" th:text="${sellOrder.orderDate}">1</td>
            <td class="td_goods_price" rowspan="2" th:text="${sellOrder.goodsPrice}+'元'">￥20</td>
            <td class="td_seller1">买家:</td>
            <td class="td_state" rowspan="2" th:text="${sellOrder.orderStatus.getInfo()}">正在运输中</td>
            <td class="td_operate1"> <a onclick="disp_confirm_finish()" th:href="@{ackReceive(orderId=${sellOrder.orderId})}" href="#">完成交易</a></td>
        </tr>
        <tr>
            <td class="td_seller2" th:text="${sellOrder.buyerName}">XXX</td>
            <td class="td_operate2"><a onclick="disp_confirm_cancel()" th:href="@{cancelOrder(orderId=${sellOrder.orderId})}" href="#">取消订单</a></td>
        </tr>
        </tbody>
    </table>
</div>

<div id="div2"></div>
<div id="div3">balabala</div>


<script type="text/javascript">
    function disp_confirm_receive()
    {
        var r=confirm('确定收货吗？');
        if (r==true)
        {

        }
        else
        {

        }
    }

    function disp_confirm_finish()
    {
        var r=confirm('完成交易吗？');
        if (r==true)
        {

        }
        else
        {

        }
    }

    function disp_confirm_cancel()
    {
        var r=confirm('确定取消订单吗？');
        if (r==true)
        {

        }
        else
        {

        }
    }
</script>

</body>
</html>